<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page isELIgnored="false"%>
<%-- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:set var="ctx" value="${pageContext.request.contextPath}" scope="request" /> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>我的主页</title>
<script type="text/javascript" src="${ctx }/js/jquery-1.9.1.min.js"></script> 
<script type="text/javascript">
jQuery.browser={};(function(){jQuery.browser.msie=false; jQuery.browser.version=0;if(navigator.userAgent.match(/MSIE ([0-9]+)./)){ jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1;}})();
</script>
<%-- <script src="${ctx }/js/jquery-migrate-1.1.1.js"></script>  --%>
<script src="${ctx }/js/grid.locale-zh.js"></script>
<script src="${ctx }/js/bootstrap.min.js"></script>
<script src="${ctx }/js/jquery.jqGrid.min.js"></script>
            
<!-- <link rel="shortcut icon" href="favicon.ico">  -->
<link href="${ctx }/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="${ctx }/css/font-awesome.css?v=4.4.0" rel="stylesheet">

<link href="${ctx }/css/animate.css" rel="stylesheet">
<link href="${ctx }/css/style.css?v=4.1.0" rel="stylesheet">
<script>if(window.top !== window.self){ window.top.location = window.location;}</script>
</head>

<script type="text/javascript">
function test(id) {
// 	$.jgrid.defaults.styleUI = 'Bootstrap';
	
	jQuery("#tableList").jqGrid({
		url : "${ctx}/seeList",
		datatype : 'json',
		mtype : 'POST',
		autowidth: true,
        shrinkToFit: true,
		colNames : [ '编号', '姓名', '密码'],
		colModel : [ 
				{name : 'id',label : 'id',hidden : true,width : 20 }, 
				{name : 'name',label : 'name',width : 80 }, 
				{name : 'password',label : 'password',width : 60 }
			],
		jsonReader : {
			repeatitems : false,
		},
		rowNum : 10,
		rowList : [ 5, 10, 20, 30 ],
		pager : '#pagerList',
		height : '300',
		width : '760',
		loadtext : '正在加载数据...',
		loadui : 'block',
		viewrecords : true,
		//        multiselect : true,
		//        rownumbers: true,
		pgbuttons : true,
		cellEdit : false,
		hidegrid : false,
//			altRows:true,
		caption : '用户信息'
	});
	//      jQuery("#test").jqGrid('supervise','#pjmap',{edit:false,add:false,del:false});
}
//双击  获取数据作为条件并刷新表格数据
function mytestClick(rowid) {
	console.log("点击行的id：" + rowid);
	//每次提出新的查询都转到第一页  
	$("#test").jqGrid("setGridParam", {
		page : 1
	});
	//提交post并刷新表格  
	$("#test").jqGrid("setGridParam", {
		url : "${ctx}/document/doGetFileList?parentId=" + rowid
	}).trigger("reloadGrid");
}

</script>

<body >
	<div class="container">
	<div style="height: 20px">
	</div>
	<div class="row clearfix">
		<div class="col-md-12 column">
			<ul class="nav nav-tabs">
				<li class="active">
					 <a href="#">首页</a>
				</li>
				<li>
					 <a href="#">简介</a>
				</li>
				<li class="disabled">
					 <a href="#">信息</a>
				</li>
				<li class="dropdown pull-right">
					 <a href="#" data-toggle="dropdown" class="dropdown-toggle">下拉<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="${ctx }/login.jsp">登录</a>
						</li>
						<li class="divider">
						</li>
						<li>
							 <a href="#">注册</a>
						</li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
	<div style="height: 20px">
	</div>
	<div class="row clearfix">
		<div class="col-md-2 column">
		
		<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						个人信息
					</h3>
				</div>
				<div class="panel-body">
					<c:if test="${empty flag}">
						<a href="${ctx }/login.jsp">登录</a><br>
					</c:if>
					<c:if test="${!empty flag}">
						<span class="desc">你好，${flag }</span>
						<a href="doLogout">退出</a><br>	
					</c:if>
				</div>
			</div>
			
		</div>
		<div class="col-md-10 column">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						Panel title
					</h3>
				</div>
				<div class="panel-body">
					<div>
						<button onclick="test()">查看所有用户信息</button>
					</div>
					<div style="height: 500px">
					<div class="group" style="width:95%;">
						<table id="tableList">
						</table>
						<div id="pagerList"></div>
					</div>
					</div>
					
				</div>
				<div class="panel-footer">
					Panel footer
				</div>
			</div>
		</div>
	</div>
</div>

</body>
</html>